<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

//index后台路由
Route::get('home','index/index/index');
Route::get('login','index/index/login');
Route::post('dologin','index/index/dologin');
Route::get('logout','index/index/logout');

//商家路由
Route::resource('gl','index/gl');
//节点路由
Route::resource('node','index/node');
//后台用户（管理员）
Route::resource('user','index/user');
//消息路由
Route::resource('message','index/message');

//接口路由
Route::get('news','index/news/index');
Route::get('news/dostatus','index/news/dostatus');


//Route::get('edit','gl/:id/edit');

Route::post('index/doedit','index/gl/doedit');
Route::post('index/select','index/gl/select');
Route::post('gl/changestatus','index/gl/changestatus');
Route::post('user/doedit','index/user/doedit');
Route::post('node/doedit','index/node/doedit');
Route::post('message/create','index/message/create');
Route::post('message/read','index/message/read');


//用户权限路由
Route::get('qx','index/user/qx');
Route::post('doqx','index/user/doqx');


//home前台路由
Route::get('/','home/index/index');
Route::get('aboutus','home/index/aboutus');
Route::get('qqxt','home/index/qqxt');


//miss路由
Route::miss('index/error/index');

//return [
//    '__pattern__' => [
//        'name' => '\w+',
//    ],
//    '[hello]'     => [
//        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//        ':name' => ['index/hello', ['method' => 'post']],
//    ],
//
//];
